/*
 * FileName: ManyTreeNode.java
 * Author:   zzw
 * Date:     2018年05月25日
 * Description:
 */
package com.chezhibao.trace.vo;

import java.util.ArrayList;
import java.util.List;

/**
 * 〈〉<br>
 * 〈〉
 *
 * @author zzw
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本]（可选）
 */
public class ManyTreeNode {

    /** 树节点*/
    private TreeNode data;

    /** 子树集合*/
    private List<ManyTreeNode> childList;

    /**
     * 构造函数
     *
     * @param data 树节点
     */
    public ManyTreeNode(TreeNode data) {
        this.data = data;
        this.childList = new ArrayList<ManyTreeNode>();
    }

    /**
     * 构造函数
     *
     * @param data 树节点
     * @param childList 子树集合
     */
    public ManyTreeNode(TreeNode data, List<ManyTreeNode> childList) {
        this.data = data;
        this.childList = childList;
    }

    public TreeNode getData() {
        return data;
    }

    public void setData(TreeNode data) {
        this.data = data;
    }

    public List<ManyTreeNode> getChildList() {
        return childList;
    }

    public void setChildList(List<ManyTreeNode> childList) {
        this.childList = childList;
    }

    public static class TreeNode{

        /** 节点Id*/
        private String nodeId;

        /** 父节点Id*/
        private String parentId;

        private Msg message;

        /**
         * 构造函数
         *
         * @param nodeId 节点Id
         */
        public TreeNode(String nodeId)
        {
            this.nodeId = nodeId;
        }

        /**
         * 构造函数
         *
         * @param nodeId 节点Id
         * @param parentId 父节点Id
         */
        public TreeNode(String nodeId, String parentId)
        {
            this.nodeId = nodeId;
            this.parentId = parentId;
        }

        public TreeNode(String nodeId, String parentId, Msg message) {
            this.nodeId = nodeId;
            this.parentId = parentId;
            this.message = message;
        }

        public String getNodeId() {
            return nodeId;
        }

        public void setNodeId(String nodeId) {
            this.nodeId = nodeId;
        }

        public String getParentId() {
            return parentId;
        }

        public void setParentId(String parentId) {
            this.parentId = parentId;
        }

        public Msg getMessage() {
            return message;
        }

        public void setMessage(Msg message) {
            this.message = message;
        }
    }
}
